<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="#{webGlobal.url_template}/default/main.xhtml">

	<ui:define name="head">
		<link href="#{webGlobal.url_module}/index/r/css/index.css"
			rel="stylesheet" />
	</ui:define>

	<ui:define name="content">
		<div class="main-container">

			<div class="inner-container">
				<div class="container well">
					<div class="bs-example bs-example-tabs">
						<ul id="myTab" class="nav nav-tabs">
							<li class="active"><a href="#admin" data-toggle="admin">Administrateur</a></li>
							<li class=""><a href="#manager" data-toggle="manager">Manager</a></li>
							<li class=""><a href="#tournament" data-toggle="tournament">Visiteur</a></li>
							<li class=""><a href="#filldb" data-toggle="filldb">Jeu
									de test</a></li>
						</ul>
						<div id="myTabContent" class="tab-content">
							<div class="tab-pane fade active in" id="admin">
								<h3>Administrateur ? Connectez-vous !</h3>
								<h:form styleClass="form-signin" prependId="false">
									<h:outputLabel for="login">Identifiant</h:outputLabel>
									<h:inputText id="login" styleClass="form-control"
										required="true" value="#{index.login}" requiredMessage="L'identifiant n'est pas valide" />
									<h:message for="login" errorStyle="color: red;"/>
									<br />
									<h:outputLabel for="password">Password</h:outputLabel>
									<h:inputSecret id="password" styleClass="form-control"
										required="true" value="#{index.password}" requiredMessage="Le mot de passe n'est pas valide" />
									<h:message for="password" errorStyle="color: red;"/>
									<h:commandButton id="validate"
										styleClass="btn btn-lg btn-primary btn-block"
										action="#{index.validate()}" value="S'identifier"></h:commandButton>
									<h:message for="validate" errorStyle="color: red;"/>
								</h:form>
							</div>
							<div class="tab-pane fade" id="manager">
								<h3>Manager, faites participer votre équipe.</h3>
								<h:outputLink styleClass="btn btn-lg btn-primary teamaccessdiv" 
								value="#{webGlobal.url_module}/team/addTeamManagerStepOne.jsf">
								Enregistrer mon &eacute;quipe.
								</h:outputLink>
							</div>
							<div class="tab-pane fade" id="tournament">
								<h3>Vous souhaitez profiter du spectacle ?</h3>
								<a href="#{webGlobal.url_module}/public/choiceTournament.jsf"
									class="btn btn-lg btn-primary publicaccessdiv"> Consulter
									les tournois </a>
							</div>
							<div class="tab-pane fade" id="filldb">
								<h:form>
									<h3>Envoyer jeu de données ?</h3>
									<h:commandButton action="#{index.fillDb()}"
										value="Charger base de données"
										class="btn btn-lg btn-primary publicaccessdiv" />
								</h:form>
							</div>
						</div>
					</div>
				</div>
			</div>


			<script type="text/javascript">
				jQuery(document).ready(function() {
					$('#myTab a').click(function(e) {
						e.preventDefault()
						$(this).tab('show')
					});
				});
			</script>
		</div>
	</ui:define>
</ui:composition>
</html>